import http from '../common/axios.js'

//获取个人信息
function get_infor(){
		let url='/user/infor'
		return http.get(url).then(res=>{
			return res;
		})	
}

//获取个人信息
function create_house_qrcode(id){
		let url='/user/create_house_qrcode?id='+id
		return http.get(url).then(res=>{
			return res;
		})	
}

//验证token
function token_verify()
{
	let url='check_token'
	return http.get(url).then(res=>{
		return res;
	})	
}

//更新个人信息
function update_infor(data){
		let url='/user/update_infor'
		return http.post(url,data).then(res=>{
			return res;
		})	
}

//用户提现
function tx(data){
		let url='/user/tx'
		return http.post(url,data).then(res=>{
			return res;
		})	
}

//获取邀请用户
function get_invite_user(){
		let url='/user/get_invite_user'
		return http.get(url).then(res=>{
			return res;
		})	
}

//获取分销日志
function get_fx_log(){
		let url='/user/get_fx_log'
		return http.get(url).then(res=>{
			return res;
		})	
}

//获取邀请用户
function bind_user(id){
		let url='/user/bind_user?invite_id='+id
		return http.get(url).then(res=>{
			return res;
		})	
}

//获取邀请用户
function bind_mobile(data){
		let url='/user/bind_mobile'
		return http.post(url,data).then(res=>{
			return res;
		})	
}


export default{
	get_infor,
	create_house_qrcode,
	token_verify,
	update_infor,
	get_invite_user,
	tx,
	get_fx_log,
	bind_user,
	bind_mobile
}